using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._ContingentValues
{
    /// <summary>
    /// <para>Alter Field Group</para>
    /// <para>Alters the properties of a field group.</para>
    /// <para>更改字段组的属性。</para>
    /// </summary>    
    [DisplayName("Alter Field Group")]
    public class AlterFieldGroup : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AlterFieldGroup()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_table">
        /// <para>Target Table</para>
        /// <para>The table containing the field group to be altered.</para>
        /// <para>包含要更改的字段组的表。</para>
        /// </param>
        /// <param name="_name">
        /// <para>Field Group Name</para>
        /// <para>The name of the field group to be altered.</para>
        /// <para>要更改的字段组的名称。</para>
        /// </param>
        public AlterFieldGroup(object _target_table, object _name)
        {
            this._target_table = _target_table;
            this._name = _name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Alter Field Group";

        public override string CallName => "management.AlterFieldGroup";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_target_table, _name, _new_name, _fields, _out_table, _is_restrictive.GetGPValue()];

        /// <summary>
        /// <para>Target Table</para>
        /// <para>The table containing the field group to be altered.</para>
        /// <para>包含要更改的字段组的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_table { get; set; }


        /// <summary>
        /// <para>Field Group Name</para>
        /// <para>The name of the field group to be altered.</para>
        /// <para>要更改的字段组的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Group Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _name { get; set; }


        /// <summary>
        /// <para>New Field Group Name</para>
        /// <para>The new, unique name for the field group.</para>
        /// <para>字段组的新唯一名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("New Field Group Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _new_name { get; set; } = null;


        /// <summary>
        /// <para>New Fields</para>
        /// <para>The fields that participate in the field group. To modify the fields, enter new field names. Provided values will replace, not append, the current list of fields that participates in the field group. If no values are provided, the fields will not be altered.</para>
        /// <para>参与字段组的字段。要修改字段，请输入新的字段名称。提供的值将替换（而不是追加）参与字段组的字段的当前列表。如果未提供任何值，则不会更改字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("New Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _fields { get; set; } = null;


        /// <summary>
        /// <para>Updated Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Is Restrictive</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the field group is restrictive. This parameter allows you to control the editing experience when using contingent values.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The field group is restrictive. Values entered on a field in the field group are restricted to those specified as contingent values. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The field group is not restrictive. Values can be committed to a field in a field group even if they are not specified as contingent values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定字段组是否具有限制性。此参数允许您在使用条件值时控制编辑体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 字段组为限制性字段组。在字段组中的字段上输入的值仅限于指定为条件值的值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 字段组不具有限制性。即使未将值指定为条件值，也可以将值提交到字段组中的字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Is Restrictive")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _is_restrictive_value _is_restrictive { get; set; } = _is_restrictive_value._true;

        public enum _is_restrictive_value
        {
            /// <summary>
            /// <para>RESTRICT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RESTRICT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_RESTRICT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_RESTRICT")]
            [GPEnumValue("false")]
            _false,

        }

        public AlterFieldGroup SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}